#ifndef OBJET
#define OBJET

#ifdef WIN32
#include <Windows.h>
#endif

#include <GL/glew.h>
#include <string>
#include <map>
#include <iostream>

#include "shader.h"
#include "Vector3.h"
#include "catmullCurve.h"

class Objet
{
	friend class ParticleSystem;

	public:
		Objet();
		Objet(int geom, int texid, Shader* s);
		~Objet();
		void setShader(Shader *s) ;
		void setGeometry(GLuint displist) ;
		void setPosition(Vec3 pos);
		void setScale(Vec3 scale);
		void setSpeed(Vec3 speed);
		void setRotation(float angle,Vec3 axe);
		void setPath(catmullCurve *curve);
		void setTexture(GLuint texid);
		void setRender(bool b){m_render=b;};
		bool getRender(){return m_render;};
		GLuint getTexture() {return m_texture;};
		bool isTransp(){return m_transp;};
		void setTransp(bool b){m_transp=b;};
		Vec3 getPosition() {return m_pos;};
		Vec3 getScale() {return m_scale;};
		Shader* getShader() {return m_shader;};
		void draw();
		void animate(float dt);

	private:
		catmullCurve *path;
		Shader *m_shader;
		GLuint m_geometry;
		GLuint m_texture;
		Vec3 m_axeRot;
		Vec3 m_scale;
		float m_angle;
		Vec3 m_pos;
		Vec3 m_posinit;
		Vec3 m_speed;
		bool m_render;
		bool m_transp;
};

#endif
